function isFullSize() {
    return $('.logo_info_bar #show_full').text() == "Suma\u017einti";
}

function showFullSize() {
    $('.logo_info_bar #show_full').text("Suma\u017einti");
    $('.box_left').width('auto');
}

function showSmallSize() {
    $('.logo_info_bar #show_full').text("Rodyti visu dyd\u017eiu");
    $('.box_left').width(795);
}

function toggleFullSize() {
    if (isFullSize()) {
        showSmallSize();
    } else {
        showFullSize();
    }
    saveSizeState();
}

/* Save and load state from cookie */
function saveSizeState() {
    $.cookie('paa_full_size', isFullSize() ? 'on' : null, {expires: 7, path: '/'});
}

function loadSizeState() {
    if ($.cookie('paa_full_size')) {
        showFullSize();
    } else {
        showSmallSize();
    }
}

$(document).ready(function() {
    loadSizeState();
})